﻿@page
@inherits Rechargeable.Web.Pages.RechargeablePage
@using Rechargeable.Machines.Dto
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@model Rechargeable.Web.Pages.Products.Prices.CreateSerialNumbersModel
@{
    Layout = null;
}
<form action="/Products/Prices/CreateSerialNumbers" method="post" novalidate="novalidate">
    @Html.AntiForgeryToken()
    <abp-modal>
        <abp-modal-header title="充值"></abp-modal-header>
        <abp-modal-body>
            <div>
                <div class="form-group">
                    <label for="ProductPriceDesc">名称</label>
                    <input type="text" id="ProductPriceDesc" name="ProductName" value="@Model.ProductName" class="form-control valid" aria-invalid="false">
                    @* <span class="text-danger field-validation-valid" data-valmsg-for="CreateSerialNumbersDto.ProductName" data-valmsg-replace="true"></span>*@
                </div>
                <div class="form-group">
                    <label for="ProductPriceDesc">价格信息</label>
                    <input type="text" id="ProductPriceDesc" name="ProductPriceDesc" value="@Model.ProductPriceDesc" class="form-control valid" aria-invalid="false">
                    <span class="text-danger field-validation-valid" data-valmsg-for="ProductPriceDesc" data-valmsg-replace="true"></span>
                </div>
                <div class="form-group">
                    <label for="UserId">用户</label>
                    <select data-val="true" data-val-required="用户必须选择." id="UserId" name="UserId" value="4" class="form-control" aria-describedby="CreateSerialNumbersDto_Users_Capacity-error" aria-invalid="true">
                        @{
                            foreach (var user in Model.Users)
                            {
                                <option value="@user.Id">@user.UserName</option>
                            }
                        }
                    </select>
                </div>
                <div class="form-group">
                    <label for="Count">数量</label>
                    <input type="number" data-val="true" data-val-required="The Count field is required." id="Count" name="Count" value="1" class="form-control valid" aria-describedby="CreateSerialNumbersDto_Users_Count-error" aria-invalid="false">
                    <span class="text-danger field-validation-valid" data-valmsg-for="Count" data-valmsg-replace="true"></span>
                </div>
                <div class="form-group">
                    <label for="Desc">充值说明：</label><span> * </span>
                    <textarea data-val="true" data-val-required="本次添加说明" id="Desc" name="Desc" class="form-control " rows="5"></textarea>
                    <span class="text-danger field-validation-valid" data-valmsg-for="Desc" data-valmsg-replace="true"></span>
                </div>
                <input type="hidden" value="@Model.ProductId" name="productId" />
                <input type="hidden" value="@Model.ProductPriceId" name="productPriceId" />
            </div>
        </abp-modal-body>
        <abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
    </abp-modal>
</form>